package qlsl.androiddesign.fragment.commonfragment;

import qlsl.androiddesign.util.commonutil.Log;
import qlsl.androiddesign.view.baseview.FunctionView;
import qlsl.androiddesign.view.subview.fragmentview.TestVp2View;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.qlsl.androiddesign.kuaiwa.R;

public class TestVp2Fragment extends TabFragment {

	private TestVp2View functionView;

	public void onDestroy() {
		Log.e("qlsl", "onDestroy");
		super.onDestroy();
	}

	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		Log.e("qlsl", "11111111111111");
		if (functionView == null) {
			ViewGroup contentView = (ViewGroup) inflater.inflate(
					R.layout.common_activity_refresh_list_view, null);
			functionView = new TestVp2View(this, onCreateView(inflater),
					contentView);
		}
		ViewGroup parent = (ViewGroup) functionView.view.getParent();
		if (parent != null) {
			parent.removeView(functionView.view);
		}
		return functionView.view;
	}

	public FunctionView<?> getFunctionView() {
		return functionView;
	}

	public void onTabResume() {

	}

	public void onTabPause() {

	}

	public void onNetWorkSucceed(String method, Object values) {
		if (method.equals("queryPostingList")) {
			functionView.showData(values);
		}
	}

}
